<template>
	<view class="main">
		<my-back></my-back>
		<logo></logo>
		
		<view class="form" v-show="type == 0">
			<view class="btn-wrap">
				<button class="cu-btn block radius register" @click="cg(1)">
					忘记密码
				</button>
				<button class="cu-btn block radius login margin-top" @click="cg(2)">
					修改交易密码
				</button>
			</view>
		</view>
		
		<cgpwd v-if="type == 1" key="1"></cgpwd>
		<cgpaypwd v-if="type == 2" key="2"></cgpaypwd>
	</view>
</template>

<script>
	import logo from '@/pages/account/logo.vue'
	import cgpwd from '@/pages/account/cgpwd.vue'
	import cgpaypwd from '@/pages/account/cgpaypwd.vue'
	export default {
		components: {
			logo,
			cgpwd,
			cgpaypwd
		},
		data() {
			return {
				type: 0
			}
		},
		onLoad(opt) {
			if (opt.type) {
				this.type = opt.type
			}
		},
		methods: {
			cg(type) {
				this.type = type
			}
		}
	}
</script>

<style lang="scss">
	.main {
		height: 100vh;
		background: url(../../static/images/login.png);
		background-size: cover;
		display: flex;
		flex-flow: column;
		padding-top: 10vh;
		
		/deep/ .form {
			padding: 0 60rpx;
			.ipt-group {
				position: relative;
				.icon {
					width: 40rpx;
					height: 40rpx;
					left: 90rpx;
					top: 50%;
					transform: translate(-50%, -50%);
					position: absolute;
				}
				.ipt {
					height: 80rpx;
					border-radius: 40rpx;
					margin: 30rpx;
					font-size: 30rpx;
					color: #97A2B9 !important;
					background-color: rgba(37,59,102,0.3);
					padding: 0 100rpx;
				}
				.ipt-pc {
					color: #97A2B9 !important;
				}
			}
			.btn-wrap {
				padding: 100rpx 36rpx 36rpx 36rpx;
				.cu-btn {
					padding-top: 40rpx;
					padding-bottom: 40rpx;
					letter-spacing: 6rpx;
				}
				.login {
					background-color: #00D388;
					color: #fff;
				}
				.register {
					background-color: #5478F8;
					color: #fff;
				}
			}
		}
		
		.switch {
			text-align: center;
			color: #fff;
			letter-spacing: 6rpx;
		}
	}
</style>
